{extend name="public:base"/}

{block name="title"}管理员列表{/block}
{block name="style"}{/block}

{block name="main"}

<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header m-b-sm">
                    <h3 class="box-title">管理员列表</h3>
                </div>
                <!--
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="/backend/addons/rf-merchants/config/index"> 配置管理</a></li>
                        <li><a href="/backend/addons/rf-merchants/config-cate/index"> 配置分类</a></li>
                        <li class="pull-right">
                            <a class="btn btn-primary btn-xs" href="/backend/addons/rf-wechat/rule/edit"><i
                                    class="fa fa-plus"></i> 创建</a>
                        </li>
                    </ul>
                </div>
                -->
                <div class="farPaddingJustV">
                    <div class="col-sm-8">
                        <form method="get">

                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="full_name" value="<?=input('full_name')?input('full_name'):''?>"
                                           placeholder="姓名">
                                </div>
                            </div>

                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="id" value="<?=input('id')?input('id'):''?>"
                                           placeholder="管理员ID">
                                    <span class="input-group-btn"><button
                                            class="btn btn-white"><i class="fa fa-search"></i> 搜索</button>
                                        </span>

                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="clearfix"></div>

                <div class="box-body table-responsive">

                    <div class="menu-buttons m-b-sm">
                        <a href="{:url('admin/manage/create')}" class="btn btn-sm btn-primary"><i class="fa fa-plus" ></i>新增管理员</a>
                    </div>

                    <table id="table-index" class="table table-hover"><thead>
                    <tr>
                        <th style="width: 20%;">ID</th>
                        <th style="width: 20%;">姓名</th>
                        <th style="width: 10%;">登录账号</th>
                        <th style="width: 10%;">角色</th>
                        <th style="width: 10%;">是否启用</th>
                        <th style="width: 10%;">操作</th>
                    </tr>

                    </thead>
                        <tbody>
                        <?php if(!empty($dataProvider)){ foreach($dataProvider as $k=>$v){?>

                        <tr class="treegrid-<?=$v['id']?> <?=$v['parent_id'] == 0?'':'treegrid-parent-'.$v['parent_id']?>"  data-key="<?=$v['id']?>">
                            <td><?=$v['id']?></td>
                            <td>
                                <span class="m-l-sm"><?=$v['full_name']?></span>
                            </td>

                            <td>
                                <span class="m-l-sm"><?=$v['account']?></span>
                            </td>

                            <td><?=$v['role_id']?></td>
                            <td><?=$v['status']?></td>
                            <td>
                                <?php if($v['id'] >1){?>
                                <a class="btn btn-primary btn-xs" href="{:url('admin/manage/update',['id'=>$v['id']])}">编辑</a>
                                <a class="btn btn-danger btn-xs" href="{:url('admin/manage/delete',['id'=>$v['id']])}" onclick="ptyConfirmDelete('{:url('admin/manage/delete')}',{$v['id']});return false;">删除</a>                  <?php }?>

                            </td>
                        </tr>

                        <?php }} ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
</section>
{/block}

{block name="js"}
{/block}


